<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="header.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form action="${path}/user?method=update" method="post">
		<input name="id" type="hidden" value="${user.id}"/>
		用户名: <input type="text" name="name" value="${user.name}" /><br/>
		密码: <input type="text" name="password"  value="${user.password}" /><br/>
		邮箱: <input type="text" name="email"  value="${user.email}"/><br/>
		年龄: <input type="text" name="age"  value="${user.age}"/><br/>
		部门: <select name="departmentId">
				<c:forEach items="${list}" var="department">
					<c:if test="${user.departmentId==department.id }">
						<option selected="selected" value="${department.id}">${department.name}</option>
					</c:if>
					<c:if test="${user.departmentId!=department.id }">
						<option value="${department.id}">${department.name}</option>
					</c:if>
				</c:forEach>
			</select>
			<br/>
		 <input type="submit" value="修改"/><br/>
	</form>
</body>
</html>